home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 3 / Light ROM 3 - Disc 2.iso / programs / amiga / jpeggers / jpeg_v6 / jpeg_v6.lha / doc / djpeg.man < prev    next >
Text File  |  1995-09-05  |  10KB  |  265 lines

  1.  
  2.  
  3.  
  4. DJPEG(1)                                                 DJPEG(1)
  5.  
  6.  
  7. NAME
  8.        djpeg - decompress a JPEG file to an image file
  9.  
  10. SYNOPSIS
  11.        djpeg [ options ] [ filename ]
  12.  
  13.  
  14. DESCRIPTION
  15.        djpeg  decompresses  the  named JPEG file, or the standard
  16.        input if no file is named, and produces an image  file  on
  17.        the  standard output.  PBMPLUS (PPM/PGM), BMP, GIF, Targa,
  18.        or  RLE  (Utah  Raster  Toolkit)  output  format  can   be
  19.        selected.   (RLE  is  supported only if the URT library is
  20.        available.)
  21.  
  22. OPTIONS
  23.        All  switch  names  may  be  abbreviated;   for   example,
  24.        -grayscale  may  be  written  -gray  or  -gr.  Most of the
  25.        "basic" switches can be abbreviated to as  little  as  one
  26.        letter.  Upper and lower case are equivalent (thus -GIF is
  27.        the same as -gif).  British spellings  are  also  accepted
  28.        (e.g.,  -greyscale), though for brevity these are not men¡
  29.        tioned below.
  30.  
  31.        The basic switches are:
  32.  
  33.        -colors N
  34.               Reduce image to at most N colors.  This reduces the
  35.               number  of colors used in the output image, so that
  36.               it can be displayed on  a  colormapped  display  or
  37.               stored  in a colormapped file format.  For example,
  38.               if you have an 8-bit display, you'd need to  reduce
  39.               to 256 or fewer colors.
  40.  
  41.        -quantize N
  42.               Same  as -colors.  -colors is the recommended name,
  43.               -quantize is provided only for  backwards  compati¡
  44.               bility.
  45.  
  46.        -fast  Select recommended processing options for fast, low
  47.               quality output.  (The default  options  are  chosen
  48.               for  highest  quality  output.)  Currently, this is
  49.               equivalent to -dct fast -nosmooth -onepass  -dither
  50.               ordered.
  51.  
  52.        -grayscale
  53.               Force gray-scale output even if JPEG file is color.
  54.               Useful for viewing on  monochrome  displays;  also,
  55.               djpeg runs noticeably faster in this mode.
  56.  
  57.        -scale M/N
  58.               Scale  the output image by a factor M/N.  Currently
  59.               the scale factor must be 1/1,  1/2,  1/4,  or  1/8.
  60.               Scaling  is  handy if the image is larger than your
  61.  
  62.  
  63.  
  64.                            15 June 1995                         1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DJPEG(1)                                                 DJPEG(1)
  71.  
  72.  
  73.               screen; also, djpeg runs much faster  when  scaling
  74.               down the output.
  75.  
  76.        -bmp   Select  BMP  output format (Windows flavor).  8-bit
  77.               colormapped  format  is  emitted  if   -colors   or
  78.               -grayscale  is  specified,  or  if the JPEG file is
  79.               gray-scale; otherwise, 24-bit full-color format  is
  80.               emitted.
  81.  
  82.        -gif   Select  GIF output format.  Since GIF does not sup¡
  83.               port more than 256 colors, -colors 256  is  assumed
  84.               (unless you specify a smaller number of colors).
  85.  
  86.        -os2   Select  BMP output format (OS/2 1.x flavor).  8-bit
  87.               colormapped  format  is  emitted  if   -colors   or
  88.               -grayscale  is  specified,  or  if the JPEG file is
  89.               gray-scale; otherwise, 24-bit full-color format  is
  90.               emitted.
  91.  
  92.        -pnm   Select PBMPLUS (PPM/PGM) output format (this is the
  93.               default format).  PGM is emitted if the  JPEG  file
  94.               is gray-scale or if -grayscale is specified; other¡
  95.               wise PPM is emitted.
  96.  
  97.        -rle   Select RLE output format.  (Requires URT  library.)
  98.  
  99.        -targa Select  Targa  output format.  Gray-scale format is
  100.               emitted if  the  JPEG  file  is  gray-scale  or  if
  101.               -grayscale  is  specified;  otherwise,  colormapped
  102.               format is emitted if -colors is  specified;  other¡
  103.               wise, 24-bit full-color format is emitted.
  104.  
  105.        Switches for advanced users:
  106.  
  107.        -dct int
  108.               Use integer DCT method (default).
  109.  
  110.        -dct fast
  111.               Use fast integer DCT (less accurate).
  112.  
  113.        -dct float
  114.               Use floating-point DCT method.  The float method is
  115.               very slightly more accurate than  the  int  method,
  116.               but  is  much  slower  unless your machine has very
  117.               fast  floating-point  hardware.   Also  note   that
  118.               results  of  the  floating-point  method  may  vary
  119.               slightly across machines, while the integer methods
  120.               should  give the same results everywhere.  The fast
  121.               integer method is much less accurate than the other
  122.               two.
  123.  
  124.        -dither fs
  125.               Use  Floyd-Steinberg  dithering  in color quantiza¡
  126.               tion.
  127.  
  128.  
  129.  
  130.                            15 June 1995                         2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. DJPEG(1)                                                 DJPEG(1)
  137.  
  138.  
  139.        -dither ordered
  140.               Use ordered dithering in color quantization.
  141.  
  142.        -dither none
  143.               Do not use dithering  in  color  quantization.   By
  144.               default,  Floyd-Steinberg dithering is applied when
  145.               quantizing colors; this is slow  but  usually  pro¡
  146.               duces  the  best results.  Ordered dither is a com¡
  147.               promise between speed and quality; no dithering  is
  148.               fast  but  usually  looks  awful.   Note that these
  149.               switches have no effect unless  color  quantization
  150.               is being done.  Ordered dither is only available in
  151.               -onepass mode.
  152.  
  153.        -map file
  154.               Quantize to the colors used in the specified  image
  155.               file.   This is useful for producing multiple files
  156.               with identical color maps, or for forcing a  prede¡
  157.               fined set of colors to be used.  The file must be a
  158.               GIF or PPM file. This option overrides -colors  and
  159.               -onepass.
  160.  
  161.        -nosmooth
  162.               Use a faster, lower-quality upsampling routine.
  163.  
  164.        -onepass
  165.               Use  one-pass  instead  of two-pass color quantiza¡
  166.               tion.  The one-pass method is faster and needs less
  167.               memory,  but  it  produces  a  lower-quality image.
  168.               -onepass is ignored unless you also say -colors  N.
  169.               Also,  the one-pass method is always used for gray-
  170.               scale output (the two-pass method is no improvement
  171.               then).
  172.  
  173.        -maxmemory N
  174.               Set limit for amount of memory to use in processing
  175.               large images.  Value is in thousands of  bytes,  or
  176.               millions of bytes if "M" is attached to the number.
  177.               For example, -max 4m  selects  4000000  bytes.   If
  178.               more space is needed, temporary files will be used.
  179.  
  180.        -outfile name
  181.               Send output image to the named file, not  to  stan¡
  182.               dard output.
  183.  
  184.        -verbose
  185.               Enable debug printout.  More -v's give more output.
  186.               Also, version information is printed at startup.
  187.  
  188.        -debug Same as -verbose.
  189.  
  190. EXAMPLES
  191.        This example decompresses the JPEG file foo.jpg, automati¡
  192.        cally quantizes to 256 colors, and saves the output in GIF
  193.  
  194.  
  195.  
  196.                            15 June 1995                         3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. DJPEG(1)                                                 DJPEG(1)
  203.  
  204.  
  205.        format in foo.gif:
  206.  
  207.               djpeg -gif foo.jpg > foo.gif
  208.  
  209. HINTS
  210.        To get a quick preview of an  image,  use  the  -grayscale
  211.        and/or  -scale  switches.   -grayscale  -scale  1/8 is the
  212.        fastest case.
  213.  
  214.        Several options are available that trade off image quality
  215.        to gain speed.  -fast turns on the recommended settings.
  216.  
  217.        -dct fast and/or -nosmooth gain speed at a small sacrifice
  218.        in  quality.   When  producing  a  color-quantized  image,
  219.        -onepass  -dither  ordered  is fast but much lower quality
  220.        than the default behavior.  -dither none may give  accept¡
  221.        able  results in two-pass mode, but is seldom tolerable in
  222.        one-pass mode.
  223.  
  224.        If you are fortunate enough to  have  very  fast  floating
  225.        point  hardware,  -dct  float may be even faster than -dct
  226.        fast.  But on most machines -dct float is slower than -dct
  227.        int; in this case it is not worth using, because its theo¡
  228.        retical accuracy advantage is too small to be  significant
  229.        in practice.
  230.  
  231. ENVIRONMENT
  232.        JPEGMEM
  233.               If  this  environment variable is set, its value is
  234.               the default memory limit.  The value  is  specified
  235.               as  described  for  the -maxmemory switch.  JPEGMEM
  236.               overrides the default value specified when the pro¡
  237.               gram  was  compiled, and itself is overridden by an
  238.               explicit -maxmemory.
  239.  
  240. SEE ALSO
  241.        cjpeg(1), jpegtran(1), rdjpgcom(1), wrjpgcom(1)
  242.        ppm(5), pgm(5)
  243.        Wallace, Gregory K.  "The JPEG Still  Picture  Compression
  244.        Standard", Communications of the ACM, April 1991 (vol. 34,
  245.        no. 4), pp. 30-44.
  246.  
  247. AUTHOR
  248.        Independent JPEG Group
  249.  
  250. BUGS
  251.        Arithmetic coding is not supported for legal reasons.
  252.  
  253.        Still not as fast as we'd like.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                            15 June 1995                         4
  263.  
  264.  
  265.